#ifndef DATE_H
#define DATE_H


class Date
{
    public:
       Date();
       Date(char strDate[]);
       Date(int Y,int M,int D);
       void setDate(int Y,int M,int D);
       void show()const;
       int getYear();
       void setYaer(int Y);
       int getMonth();
       void setMonth(int M);
       int getDay();
       void setDay(int D);;
       char* toString();
       int daysperMonth(int m=-1)const;
       int daysperYear(int y=-1)const;
       int compare(const Date &date)const;
       bool isLeapYear(int Y=-1)const;
       int subDate(const Date &date)const;
       Date subDays(int days)const;
       Date addDays(int days)const;
       private:
       int year,month,day;
       void addOneDay();
       void subOneDay();
       int subSmallDate(const Date &dat)const;
};

#endif // DATE_H
